Overview of the control mode script

Process+ uses the Control Mode Rules script to determine the control mode for each loop.

When adding a Process+ Action Object to the CSense Runtime Manager, one of the configuration steps is to add a script to the Action Object, defining the rules and conditions that will determine the control mode of each control loop.  

It is important to define rules for process operating conditions, so that when the process functioning breaks these rules, the control system will change to another operating mode. Where the process is operating in a state that is dangerous, or is far from specification, the control system must be set to change to SHUTDOWN mode, and the control loop or system will stop operating.

The control mode script will show a runnability error if it is left empty.

Default control mode names

Process+ recognizes the following 4 control modes:

  • AUTO: The loop is operating in full automatic control mode.

  • MANUAL: The loop is operating under manual/operator control.

  • CASCADE: The loop is being controlled by another loop as part of a cascaded loop configuration.

  • SHUTDOWN: The loop is not operating; it has been shut down.

These predefined constants for the control mode names are listed in the script editor as:

  • CONTROL_MODE_MANUAL

  • CONTROL_MODE_AUTO

  • CONTROL_MODE_CASCADE

  • CONTROL_MODE_SHUTDOWN

About writing the control mode script

Inputs to the script are the control mode tags: LoopName_Tag_VV, LoopName_Tag_WW, LoopName_Tag_XX, LoopName_Tag_YY, and LoopName_Tag_ZZ. These tags are used to deduce the control state of the loop.

The Process+ Action Object needs to be able to read in the values for each tag, and use this value to determine the current control mode of the loop. This happens for each control loop contained in the Action Object.

The current control mode of the loop is derived through a number of control mode rules that operate on the values of one or more of these control mode tags. The full paths to the control mode tags are specified as "LoopName_Tag_VV", "LoopName_Tag_WW"..."LoopName_Tag_ZZ" parameters defined in the .csv file.

The script is made up of three sections:

  1. Quality check: used to define what to do with good or bad quality data

  2. Rules: define the conditions for when each control mode will be active

  3. Default outcome: set a default mode for when none of the above conditions are true.

The script can be added to the Action Object in a number of ways:

  1. Write a script defining the control mode rules using the Script Editor.

  2. Script Generator: use the template to create a generic script that will be applied to all the loops in your .csv file.

  3. Load: load a previously saved script, a customized script, or a script received from a colleague.


Related topics:

  

CSense 2023- Last updated: June 24,2025